package cn.edu.cqut.entity;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author HQYJ
 * @since 2020-06-24
 */
public class Chance extends Model<Chance> {

    private static final long serialVersionUID=1L;

    /**
     * 销售机会编号
     */
    @TableId(value = "ch_no", type = IdType.AUTO)
    private Integer chNo;

    /**
     * 客户名称
     */
    private String chName;

    /**
     * 联系人
     */
    private String chContacts;

    /**
     * 联系电话
     */
    private String chPhone;

    /**
     * 机会描述
     */
    private String chDescribed;

    /**
     * 创建人
     */
    private String chCreator;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private LocalDate chCreationdate;

    /**
     * 任务接收者 派遣给（空表示未派遣）
     */
    private String chRole;

    /**
     * 指派时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private LocalDate chAssigindate;

    /**
     * 销售机会状态： 0未分配、1已分配、
     */
    private Integer chState;
    
    @TableField(exist = false)
    private List<Plan> plans;

    public List<Plan> getPlans() {
		return plans;
	}

	public void setPlans(List<Plan> plans) {
		this.plans = plans;
	}

	public Integer getChNo() {
        return chNo;
    }

    public void setChNo(Integer chNo) {
        this.chNo = chNo;
    }

    public String getChName() {
        return chName;
    }

    public void setChName(String chName) {
        this.chName = chName;
    }

    public String getChContacts() {
        return chContacts;
    }

    public void setChContacts(String chContacts) {
        this.chContacts = chContacts;
    }

    public String getChPhone() {
        return chPhone;
    }

    public void setChPhone(String chPhone) {
        this.chPhone = chPhone;
    }

    public String getChDescribed() {
        return chDescribed;
    }

    public void setChDescribed(String chDescribed) {
        this.chDescribed = chDescribed;
    }

    public String getChCreator() {
        return chCreator;
    }

    public void setChCreator(String chCreator) {
        this.chCreator = chCreator;
    }

   

    public String getChRole() {
        return chRole;
    }

    public void setChRole(String chRole) {
        this.chRole = chRole;
    }

   

    public LocalDate getChCreationdate() {
		return chCreationdate;
	}

	public void setChCreationdate(LocalDate chCreationdate) {
		this.chCreationdate = chCreationdate;
	}

	public LocalDate getChAssigindate() {
		return chAssigindate;
	}

	public void setChAssigindate(LocalDate chAssigindate) {
		this.chAssigindate = chAssigindate;
	}

	public Integer getChState() {
        return chState;
    }

    public void setChState(Integer chState) {
        this.chState = chState;
    }

    @Override
    protected Serializable pkVal() {
        return this.chNo;
    }

    @Override
    public String toString() {
        return "Chance{" +
        "chNo=" + chNo +
        ", chName=" + chName +
        ", chContacts=" + chContacts +
        ", chPhone=" + chPhone +
        ", chDescribed=" + chDescribed +
        ", chCreator=" + chCreator +
        ", chCreationdate=" + chCreationdate +
        ", chRole=" + chRole +
        ", chAssigindate=" + chAssigindate +
        ", chState=" + chState +
        "}";
    }
}
